import path from 'path'
import { defineConfig } from 'vitepress'

export default defineConfig({
  title: 'Cjui-Admin-Vue3',
  description: '一个基于Vue3+TypeScript的响应式后台管理系统模版。',
  rewrites: {
    'src/pages/guide/:pkg1/index.md': 'guide/:pkg1.md',
  },
  themeConfig: {
    logo: '/imgs/basic/cjui-vue.png',
    nav: [
      {
        text: '指南',
        link: '/guide/getting-started',
        activeMatch: '/guide/'
      },
      {
        text: '演示地址',
        link: 'https://www.oscjary.com/cjui-admin-vue3/home',
        activeMatch: ''
      }
    ],
    sidebar: {
      'guide/': [
        {
          text: '简介',
          items: [
            { text: '快速开始', link: '/project/cjui-admin-vue3/getting-started' },
          ]
        },
      ],
    },
    socialLinks: [
      { icon: 'github', link: 'https://gitee.com/cjary/cjui-admin-vue3' }
    ]
  },
  // Vite 配置选项
  vite: {
    server: {
      port: 51751,
    },
    resolve: {
      alias: [
        {
          find: '@docsrc',
          replacement: path.resolve(__dirname, '../src'),
        },
      ],
    },
  }
})
